import request from "@/utils/http_request";
import { QueryRoleParams, RoleList } from "./types/role.dto";

//获取角色列表
export const getRoleList = (query: QueryRoleParams) => {
    return request({
        url: "/user/role_list",
        method: "get",
        loading: false,
        params: query,
    });
};

//新增/更新/删除
export const addRole = (data: RoleList) => {
    return request({
        url: "/user/role_create",
        data,
        method: "post",
    });
};
